<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>个人信息</title>
    <link type="text/css" href="${pageContext.request.contextPath}/static/bootstrap3/css/bootstrap.min.css" rel="stylesheet"/>
    <link type="text/css" href="static/css/change.css" rel="stylesheet" />
    <link rel="shortcut icon" href="${pageContext.request.contextPath}/static/img/favicon.jpg" type="image/x-icon"/>
</head>
<body>
<h2 class="h2">个人信息</h2>
<form class="form-horizontal" action="${pageContext.request.contextPath}/info" method="post" enctype="multipart/form-data">
    <input type="hidden" name="id" value="${login_user.id}">
    <div class="form-group">
        <label for="name" class="col-sm-2 control-label">真实姓名</label>
        <div class="col-sm-3">
            <input type="text" class="form-control" id="name" name="name" placeholder="请输入真实姓名" value="${login_user.name}">
        </div>
    </div>
    <div class="form-group">
        <label for="pic" class="col-sm-2 control-label">头像</label>
        <div class="col-sm-10">
            <img src="file?p=${login_user.pic}" class="user-pic"/>
            <input type="file" id="pic" name="pic">
        </div>
    </div>
    <div class="form-group">
        <label for="pic" class="col-sm-2 control-label">角色</label>
        <div class="col-sm-10">
            <label class="radio-inline">
                <input type="radio" name="role" value="1" ${login_user.role == 1? 'checked': ''}> 教师
            </label>
            <label class="radio-inline">
                <input type="radio" name="role"  value="0" ${login_user.role == 0? 'checked': ''}> 管理员
            </label>
        </div>
    </div>

    <div class="form-group">
        <div class="col-sm-offset-2 col-sm-10">
            <button type="submit" class="btn btn-default">提交</button>
            <label class="error">${msg}</label>
        </div>
    </div>
</form>

</body>
</html>
